package com.ktg.mes.chanjet.response;

import com.chanjet.openapi.sdk.java.AbstractChanjetResponse;
import lombok.Data;

import java.util.List;

@Data
public class OrderSeachsResponse extends AbstractChanjetResponse {

    private String result;

    private Error error;

    private Value value;

    @Data
    public static class Error {

        private String code;

        private String msg;

        private String hint;
    }

    @Data
    public static class Value {

        private String totalCount;

        private List<Order> resultList;
    }

    @Data
    public static class Order{

        private String orderNo;

        private String createTime;

        private String orderTotal;   //订单金额

        private String payTime;

        private String payTotal;  //支付金额

        private String orderType; //订单类型 (0：新购，1：增购，2：续购，3：试用)

        private String agentCode; //服务商编码

        private Integer bussinessType;  //0 客户自主下单     1 服务商代客下单

        private List<Item> items;

        @Data
        class Item{

            private String appId;  //应用ID

            private String appName;

            private String orgId;   //下单的企业ID

            private String orgFullName; //下单的企业名称

            private String productName;

            private String startTime;  //产品有效期开始时间，格式示例：2022-08-31 15:07:18

            private String endTime;
        }
    }
}
